<?php

require_once(ISLANDS_PATH . '/Api/Service/Factory/Core.php');
require_once(ISLANDS_PATH . '/Island/Factory/Core.php');

class Api
{
	private $_island_factory = null;
	
	public function __construct()
	{
		error_reporting(E_ALL|E_STRICT);
		ini_set('display_errors', 1);

		set_include_path(APPLICATION_PATH . '/library' . PATH_SEPARATOR . get_include_path());
		
		$this->_island_factory = new CodeIslands_Island_Factory_Core();
		$this->_island_factory->setApiServiceFactory(new CodeIslands_Api_Service_Factory_Core());
	}
	
	public function getIsland($island_name)
	{
		return $this->_island_factory->getIsland($island_name);
	}
}